<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: Longley's Economic Regression Data</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="R.css">
</head><body>

<table width="100%" summary="page for longley"><tr><td>longley</td><td align="right">R Documentation</td></tr></table>

<h2>Longley's Economic Regression Data</h2>

<h3>Description</h3>


<p>A macroeconomic data set which provides a well-known example for a
highly collinear regression.
</p>


<h3>Usage</h3>

<pre>longley</pre>


<h3>Format</h3>


<p>A data frame with 7 economical variables, observed yearly from 1947 to
1962 (<i>n=16</i>).
</p>

<dl>
<dt>GNP.deflator:</dt><dd><p>GNP implicit price deflator (<i>1954=100</i>)</p>
</dd>
<dt>GNP:</dt><dd><p>Gross National Product.</p>
</dd>
<dt>Unemployed:</dt><dd><p>number of unemployed.</p>
</dd>
<dt>Armed.Forces:</dt><dd><p>number of people in the armed forces.</p>
</dd>
<dt>Population:</dt><dd><p>&lsquo;noninstitutionalized&rsquo; population
<i>&ge;</i> 14 years of age.</p>
</dd>
<dt>Year:</dt><dd><p>the year (time).</p>
</dd>
<dt>Employed:</dt><dd><p>number of people employed.</p>
</dd>
</dl>

<p>The regression <code>lm(Employed ~ .)</code> is known to be highly
collinear.
</p>


<h3>Source</h3>


<p>J. W. Longley (1967)
An appraisal of least-squares programs from the point of view of the
user.
<EM>Journal of the American Statistical Association</EM>, <B>62</B>,
819&ndash;841.
</p>


<h3>References</h3>


<p>Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
<EM>The New S Language</EM>.
Wadsworth &amp; Brooks/Cole.
</p>


<h3>Examples</h3>

<pre>
require(stats); require(graphics)
## give the data set in the form it is used in S-PLUS:
longley.x &lt;- data.matrix(longley[, 1:6])
longley.y &lt;- longley[, "Employed"]
pairs(longley, main = "longley data")
summary(fm1 &lt;- lm(Employed ~ ., data = longley))
opar &lt;- par(mfrow = c(2, 2), oma = c(0, 0, 1.1, 0),
            mar = c(4.1, 4.1, 2.1, 1.1))
plot(fm1)
par(opar)
</pre>


</body></html>
